package hnlg.com.cn.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import hnlg.com.cn.mapper.HetongMapper;
import hnlg.com.cn.service.HetongService;
import hnlg.com.cn.vo.Hetong;

@Service("hetongService")
@Transactional(value="txManager",rollbackFor=Exception.class)
public class HetongServiceImpl implements HetongService {

	@Autowired
	HetongMapper obj;
	@Override
	public boolean addHetong(Hetong vo) throws Exception {
		
		return obj.addHetong(vo);
	}

	@Override
	public boolean deleteHetong(String id) throws Exception {
		
		return obj.deleteHetong(id);
	}

	@Override
	@Transactional(propagation=Propagation.NOT_SUPPORTED,readOnly=true)
	public List<Hetong> queryHetong(Hetong vo) throws Exception {
		
		return obj.queryHetong(vo);
	}

	@Override
	public boolean updateHetong(Hetong vo) throws Exception {
		
		return obj.updateHetong(vo);
	}

	@Override
	public Hetong queryById(String id) throws Exception {
		
		return obj.queryById(id);
	}

}
